package com.zzl.finance.data.constant.type;

/**
 * 菜单按钮 枚举值
 *
 * @author : gull
 * @date : 2022/9/7 20:37
 */
public enum MenuButtonEnum {

    /**
     * 平台-融资管理，融资列表 修改 按钮
     */
    FINANCE_CREDIT_UPDATE_BUTTON("financeCreditUpdate", "修改", "融资额度修改按钮"),
    /**
     * 资方管理按钮
     */
    FINANCE_INSTITUTY_EDIT_BUTTON("financeEdit", "编辑", "资方管理修改按钮"),
    FINANCE_INSTITUTY_FROZEN_BUTTON("financeFrozen", "冻结", "资方管理冻结按钮"),
    FINANCE_INSTITUTY_ENABLE_BUTTON("financeEnable", "启用", "资方管理启用按钮"),
    ;
    private final String code;
    private final String value;
    private final String description;


    MenuButtonEnum(String code, String value, String description) {
        this.code = code;
        this.value = value;
        this.description = description;
    }

    public static String getValue(String code) {
        for (MenuButtonEnum statusEnum : MenuButtonEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.description;
            }
        }
        return "";
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
